import React, { Component } from 'react';
import axios from 'axios'
class AxiosTest extends Component {
    constructor(props) {
        super(props);
        this.state = {}
    }
    render() {
        return (
            <div>AxiosTest</div>
        )
    }
    componentDidMount(){
        axios.get('/api/todoList')
            .then((res)=>{
                console.log(res.data);
                this.setState(()=>{
                    return {
                        list :res.data
                    }
                })
            })
            .catch(()=>{console.log('error')})
    }
    
}

export default AxiosTest;